﻿<CodeSnippets
    xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>
        Button
      </Title>
    </Header>
    <Snippet>
      <Declarations>
        <Literal>
          <ID>buttonStyle</ID>
          <ToolTip>style of Button</ToolTip>
          <Default>buttonStyle</Default>
        </Literal>
        <Literal>
          <ID>name</ID>
          <ToolTip>name of Button</ToolTip>
          <Default>name</Default>
        </Literal>

        <Literal>
          <ID>triggerName</ID>
          <ToolTip>name of trigger</ToolTip>
          <Default>triggerName</Default>
        </Literal>
        
        <Literal>
          <ID>rowNumber</ID>
          <ToolTip>row number in table</ToolTip>
          <Default>rowNumber</Default>
        </Literal>

        <Literal>
          <ID>colNumber</ID>
          <ToolTip>column number in table</ToolTip>
          <Default>columnNumber</Default>
        </Literal>

       

        <Literal>
          <ID>methodName</ID>
          <ToolTip>name of method</ToolTip>
          <Default>methodName</Default>
        </Literal>

        <Literal>
          <ID>contentSourceBinding</ID>
          <ToolTip>content Source binding</ToolTip>
          <Default>Localization</Default>
        </Literal>

        <Literal>
          <ID>viewModelSource</ID>
          <ToolTip>view model source</ToolTip>
          <Default>Field</Default>
        </Literal>

      </Declarations>

      <Code Language="CSharp">
        <![CDATA[
        
 <Button x:Name="$name$" Style="{StaticResource buttonStyle}" Content="{Binding ConverterParameter=$name$", Converter={StaticResource $contentSourceBinding$}, Source={StaticResource $contentSourceBinding$}}" />
       <csla:TriggerAction Name="$triggerName$" DataContext="{Binding Source={StaticResource $viewModelSource$}}" TargetControl="{Binding ElementName=$name$}" MethodName="$methodName$" />
				
        ]]>
      </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
